package cn.study.controller;


import cn.study.entity.StudyProblem;
import cn.study.service.StudyProblemService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 问题表 前端控制器
 * </p>
 *
 * @author qiao
 * @since 2020-06-22
 */
@Slf4j
@RestController
@RequestMapping("/study-problem")
public class StudyProblemController {
    @Autowired
    StudyProblemService studyProblemService;
    @ResponseBody
    @PostMapping("/submitproblem")
    public String submitProblem(StudyProblem studyProblem){
        log.info(""+studyProblem.getProblemParticulars());
       boolean bl= studyProblemService.save(studyProblem);
        if(bl){
            return "提交反馈成功";
        }
        return "提交反馈失败";
    }
}

